package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sinosoft.ebusiness.domain.elementManage.GeProductRation;
import com.sinosoft.ebusiness.domain.elementManage.GeProductRisk;
import com.sinosoft.ebusiness.domain.elementManage.GeProductSection;
import com.sinosoft.ebusiness.domain.elementManage.GeRateConditionItem;


/**
 * POJO类GeRateCondition
 */
@Entity
@Table(name = "GE_RATE_CONDITION")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class GeRateCondition implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2387707584457719651L;


	/** 属性conditionid */
	private String conditionid;


	/** 属性geProductRisk */
	private GeProductRisk geProductRisk;

	/** 属性userspcop */
	private String userspcop;

	/** 属性geProductRations */
	private List<GeProductRation> geProductRations = new ArrayList<GeProductRation>(
			0);

	/** 属性geProductSections */
	private List<GeProductSection> geProductSections = new ArrayList<GeProductSection>(
			0);
	
	/** 属性geRateConditionItems */
	private List<GeRateConditionItem> geRateConditionItems = new ArrayList<GeRateConditionItem>(
			0);

	/**
	 * 类GeRateCondition的默认构造方法
	 */
	public GeRateCondition() {
	}

	/**
	 * 属性conditionid的getter方法
	 */
	
	@Id
	@Column(name = "CONDITIONID")
	public String getConditionid() {
		return this.conditionid;
	}

	/**
	 * 属性conditionid的setter方法
	 */
	public void setConditionid(String conditionid) {
		this.conditionid = conditionid;
	}


	/**
	 * 属性geProductRisk的getter方法
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "PRODUCTCODE", referencedColumnName = "PRODUCTCODE"),
			@JoinColumn(name = "RISKCODE", referencedColumnName = "RISKCODE"),
			@JoinColumn(name = "VERSION", referencedColumnName = "VERSION") })
	@JsonBackReference
	public GeProductRisk getGeProductRisk() {
		return this.geProductRisk;
	}

	/**
	 * 属性geProductRisk的setter方法
	 */
	public void setGeProductRisk(GeProductRisk geProductRisk) {
		this.geProductRisk = geProductRisk;
	}

	/**
	 * 属性userspcop的getter方法
	 */

	@Column(name = "USERSPCOP")
	public String getUserspcop() {
		return this.userspcop;
	}

	/**
	 * 属性userspcop的setter方法
	 */
	public void setUserspcop(String userspcop) {
		this.userspcop = userspcop;
	}

	/**
	 * 属性geProductRations的getter方法
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geRateCondition")
	@OrderBy("rationcode")
	public List<GeProductRation> getGeProductRations() {
		return this.geProductRations;
	}

	/**
	 * 属性geProductRations的setter方法
	 */
	public void setGeProductRations(List<GeProductRation> geProductRations) {
		this.geProductRations = geProductRations;
	}

	/**
	 * 属性geProductSections的getter方法
	 */
	@OrderBy("serialno")
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geRateCondition")
	public List<GeProductSection> getGeProductSections() {
		return this.geProductSections;
	}

	/**
	 * 属性geProductSections的setter方法
	 */
	public void setGeProductSections(List<GeProductSection> geProductSections) {
		this.geProductSections = geProductSections;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geRateCondition")
	public List<GeRateConditionItem> getGeRateConditionItems() {
		return geRateConditionItems;
	}

	public void setGeRateConditionItems(
			List<GeRateConditionItem> geRateConditionItems) {
		this.geRateConditionItems = geRateConditionItems;
	}

}
